package hu.mito.listviewbug;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.ListView;

public class MyListView extends ListView {

	public MyListView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public MyListView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public MyListView(Context context) {
		super(context);
	}

	@Override
	public boolean performItemClick(View view, int position, long id) {
		int viewposition = getPositionForView(view);
		if (viewposition != position) {
			Log.e("Bug", "view is no longer at position "+Integer.toString(position));
		} else {
			Log.i("Bug","view position is correct");
		}
		return super.performItemClick(view, position, id);
	}
	
}
